#ifndef __WS_SERVER_C_H__
#define __WS_SERVER_C_H__

#include "base.pb.h"

#ifdef __cplusplus
extern "C"
{
#endif

enum {
    WS_HOST,
    WS_SLAVE
};

int wsResponse(std::string &serialized_data, int cmd, int module_id, int type);
int wsResponseByClientId(std::string &serialized_data, int cmd, int module_id, int type, const std::string& client_id);
int wsResponseNotify(std::string &serialized_data, int cmd, int module_id, int type);
int wsResponsePacket(const WsPacket& ws_packet);
int getWsHostSlaveModeById(const std::string& client_id);
long getWsClientTimelapse();
void updateWsClientTimlapse();
int getWsConnectionState();
int setWsLockMaster(bool lock_master);
bool getWsLockMaster();

#ifdef __cplusplus
}
#endif

#endif